home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_gsl.idb / usr / freeware / include / gsl_histogram2d.h.z / gsl_histogram2d.h
Encoding:
C/C++ Source or Header  |  1999-07-16  |  2.2 KB  |  68 lines

  1. #ifndef GSL_HISTOGRAM2D_H 
  2. #define GSL_HISTOGRAM2D_H 
  3.  
  4. #include <stdlib.h>
  5. #include <stdio.h>
  6.  
  7. typedef struct {
  8.   size_t nx, ny ;
  9.   double * xrange ;
  10.   double * yrange ;
  11.   double * bin ;
  12. } gsl_histogram2d ;
  13.  
  14. typedef struct {
  15.   size_t nx, ny ;
  16.   double * xrange ;
  17.   double * yrange ;
  18.   double * sum ;
  19. } gsl_histogram2d_pdf ;
  20.  
  21. gsl_histogram2d * gsl_histogram2d_calloc (size_t nx, size_t ny);
  22. gsl_histogram2d * gsl_histogram2d_calloc_uniform (size_t nx, size_t ny,
  23.                          double xmin, double xmax,
  24.                          double ymin, double ymax);
  25.  
  26. void gsl_histogram2d_free (gsl_histogram2d * h);
  27.  
  28. int gsl_histogram2d_increment (gsl_histogram2d * h, double x, double y);
  29. int gsl_histogram2d_accumulate (gsl_histogram2d * h, 
  30.                 double x, double y, double weight);
  31. int gsl_histogram2d_find (const gsl_histogram2d * h, 
  32.               double x, double y, size_t * i, size_t * j);
  33. int gsl_histogram2d_find_impl (const gsl_histogram2d * h, 
  34.                    double x, double y, size_t * i, size_t * j);
  35.  
  36. double gsl_histogram2d_get (const gsl_histogram2d * h, size_t i, size_t j);
  37. int gsl_histogram2d_get_xrange (const gsl_histogram2d * h, size_t i,
  38.                 double * xlower, double * xupper);
  39. int gsl_histogram2d_get_yrange (const gsl_histogram2d * h, size_t j,
  40.                 double * ylower, double * yupper);
  41.  
  42.                      
  43. double gsl_histogram2d_xmax (const gsl_histogram2d * h);
  44. double gsl_histogram2d_xmin (const gsl_histogram2d * h);
  45. size_t gsl_histogram2d_nx (const gsl_histogram2d * h);
  46.  
  47. double gsl_histogram2d_ymax (const gsl_histogram2d * h);
  48. double gsl_histogram2d_ymin (const gsl_histogram2d * h);
  49. size_t gsl_histogram2d_ny (const gsl_histogram2d * h);
  50.  
  51. void gsl_histogram2d_reset (gsl_histogram2d * h);
  52.  
  53. int gsl_histogram2d_fwrite (FILE * stream, const gsl_histogram2d * h) ;
  54. int gsl_histogram2d_fread (FILE * stream, gsl_histogram2d * h);
  55. int gsl_histogram2d_fprintf (FILE * stream, const gsl_histogram2d * h, 
  56.                  const char * range_format,
  57.                  const char * bin_format);
  58. int gsl_histogram2d_fscanf (FILE * stream, gsl_histogram2d * h);
  59.  
  60. gsl_histogram2d_pdf * gsl_histogram2d_pdf_alloc (const gsl_histogram2d * h);
  61. void gsl_histogram2d_pdf_free (gsl_histogram2d_pdf * p);
  62. int gsl_histogram2d_pdf_sample (const gsl_histogram2d_pdf * p, 
  63.                    double r1, double r2, 
  64.                    double * x, double * y);
  65.  
  66. #endif /* GSL_HISTOGRAM2D_H */
  67.  
  68.